package com.yb.nowcoder;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * 华为机试练习第5题
 */
public class Main9 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            List<Character> list = new ArrayList<>();
            Integer x = in.nextInt();
            String s = x.toString();
            for (int i = s.length() - 1; i >= 0; i--) {
                if (list.contains(s.charAt(i))) {
                    continue;
                }
                list.add(s.charAt(i));
            }
            for (Character c : list) {
                System.out.print(c);
            }

        }
    }
}
